WARNING: This program has a bug, which means we need to fix it! This bug is a logic error.

RULE: Collision events take two parameters, sprite and hit_sprite. The sprite refers to the sprite connected to the event handler. The hit_sprite becomes whatever the main sprite hits.

  • Click Run and watch the stage to see what's wrong. Oops! The present should disappear, not the penguin!
  • Fix the code so purple_present disappears by using .remove_sprite() to remove hit_sprite.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)